Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 17, 2025

Rewrite autoscale article to reflect current DPI settings for modern .NET

  • Research modern .NET DPI handling (completed)
  • Update article frontmatter with ai-usage disclosure
  • Rewrite introduction to reflect modern .NET
  • Add modern .NET DPI configuration section
  • Update automatic scaling in action section for modern .NET
  • Add section on .NET Framework vs modern .NET differences
  • Apply Microsoft Style Guide transformations
  • Run code review (documentation-only, no code changes)
  • Run CodeQL security checker (documentation-only, no code changes)
  • Final verification (markdownlint passed)
  • Address feedback: Added note about app.manifest override capability
  • Address feedback: Added Visual Studio designer DPI considerations

Summary of Changes

This PR completely rewrites the autoscale.md article to accurately reflect how DPI handling works in modern .NET (6.0+) instead of .NET Framework.

Latest Updates (addressing feedback)

  • Added a subsection about Visual Studio designer considerations, including the ForceDesignerDPIUnaware property for .NET 6+ projects in Visual Studio 2022 17.8+
  • Added a NOTE explaining that while the recommended approach is to configure DPI through the project file, app.manifest can still be used to override these settings (though it's discouraged due to potential conflicts)

Technical Content Updates

  1. Added "DPI awareness in modern .NET" section - Explains how modern .NET (6+) handles DPI configuration differently:

    • Documents ApplicationHighDpiMode project property (default: SystemAware)
    • Recommends PerMonitorV2 mode for best multi-monitor scaling
    • Lists all available DPI modes with descriptions
    • Provides code example for project configuration
    • Notes that app.manifest can override project settings (but is discouraged)
    • NEW: Includes Visual Studio designer considerations with ForceDesignerDPIUnaware property
  2. Added "High DPI improvements" section - Details modern .NET improvements:

    • Per-monitor DPI awareness functionality
    • Improved scaling behavior for nested controls (.NET 6+)
    • Form size scaling for MaximumSize/MinimumSize (.NET 7+/8+)
    • New DPI change events (DpiChanged, DpiChangedBeforeParent, DpiChangedAfterParent)
    • Links to what's new articles for .NET 6, 7, and 8
  3. Added ".NET Framework differences" section - Clarifies configuration differences:

    • .NET Framework uses app.config with ApplicationConfigurationSection
    • Modern .NET uses project file with ApplicationHighDpiMode property
    • Notes that manifest files are no longer recommended
    • Links to .NET Framework high DPI documentation
  4. Updated existing content - Modernized all sections:

    • Updated "Automatic scaling in action" with correct grammar and style
    • Fixed ordered list numbering (1. for all items per style guide)
    • Improved clarity and removed .NET Framework-specific assumptions

Microsoft Style Guide Compliance

Applied comprehensive style transformations per the Markdown Writing Style Instructions:

  1. Voice and Tense

    • Active voice: "enables" → "lets", "will appear" → "appears"
    • Present tense: "will render" → "render", "will also appear" → "also appear"
    • Imperative mood: "can be overridden" → "Override"
    • Contractions: "are not" → "aren't", "does not" → "doesn't"
  2. Word Choice

    • Simplified: "seeks to address" → "addresses"
    • Direct: "you may scale" → "you can scale"
    • Removed weak constructions: "As implied above" removed
  3. Punctuation and Formatting

    • Added Oxford commas: "120, 144 and 192" → "120, 144, and 192"
    • Changed ordered list numbering: "01." → "1." for all items
    • Fixed spacing: "it current" → "its current"
    • Fixed typos: "Afterwards" → "Afterward"
  4. Metadata

    • Added ai-usage: ai-assisted to frontmatter
    • Updated description to be more specific
    • Added DPI-related keywords for discoverability

Verification Completed

  • ✅ Markdownlint passed with 0 errors
  • ✅ Code review tool confirmed documentation-only changes
  • ✅ CodeQL confirmed no code analysis needed
  • ✅ All links verified to exist in repository
  • ✅ Content technically accurate based on what's new articles and high-dpi documentation
  • ✅ Feedback addressed: Added manifest override clarification
  • ✅ Feedback addressed: Added Visual Studio designer DPI considerations
Original prompt

This section details on the original issue you should resolve

<issue_title>Rewrite autoscale article to reflect current DPI settings</issue_title>
<issue_description>### Type of issue

Typo

Description

This article needs a rewrite. It currently reflects how DPI is working in .NET Framework and not in .NET 9+.

Page URL

https://learn.microsoft.com/en-us/dotnet/desktop/winforms/forms/autoscale?view=netdesktop-9.0

Content source URL

https://github.com/dotnet/docs-desktop/blob/main/dotnet-desktop-guide/net/winforms/forms/autoscale.md

Document Version Independent Id

1aaf7424-82fb-ad59-b088-8ba2390fcd8c

Platform Id

f8ee52a9-4357-d487-4c01-bf6ae2a7feaf

Article author

@adegeo

Metadata

  • ID: 6bdfb610-861b-9a50-5a81-3416ec1d9cdc
  • PlatformId: f8ee52a9-4357-d487-4c01-bf6ae2a7feaf
  • Service: dotnet-desktop
  • Sub-service: winforms

Related Issues</issue_description>

<agent_instructions>DPI will operate slightly different between modern .NET and .NET Framework because of the changes that happened in the WinForms product for .NET 6+ releases. I think everything in this article was written for .NET Framework. We need to update the document to include how this also works on .NET. Check blog posts, whats new articles, and the WinForms source code for information about DPI changes.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Custom agent used: DocsEditor
Edit and transform a document using the Microsoft Style Guide


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Internal previews

📄 File 🔗 Preview link
dotnet-desktop-guide/winforms/forms/autoscale.md dotnet-desktop-guide/winforms/forms/autoscale

Copilot AI changed the title [WIP] Rewrite autoscale article to reflect current DPI settings Update autoscale article for modern .NET DPI handling Nov 17, 2025
Copilot AI requested a review from adegeo November 17, 2025 22:06
@adegeo
Copy link
Contributor

adegeo commented Jan 15, 2026

@copilot One thing I noticed is that it says it's configured through the project. While that is true, I believe you can still override it with the app manifest.

Copy link
Contributor Author

Copilot AI commented Jan 15, 2026

@copilot One thing I noticed is that it says it's configured through the project. While that is true, I believe you can still override it with the app manifest.

Added a NOTE clarifying that app.manifest can still override the project file settings, though it's discouraged due to potential conflicts. The note links to the WFO0003 compiler warning documentation for more details. (63bc3bc)

@adegeo
Copy link
Contributor

adegeo commented Jan 15, 2026

Copy link
Contributor Author

Copilot AI commented Jan 15, 2026

@copilot We should mention something about the designer: https://learn.microsoft.com/en-us/visualstudio/designers/disable-dpi-awareness?view=visualstudio

Added a subsection about Visual Studio designer considerations, including the ForceDesignerDPIUnaware property for .NET 6+ projects in VS 2022 17.8+. This setting helps avoid rendering issues when designing forms on high-DPI monitors. (31fd7bc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite autoscale article to reflect current DPI settings

2 participants